﻿@model GameSchoolApplication.Models.Test

@{
    ViewBag.Title = "Bæta við prófi";
    Layout = "~/Views/Shared/_TeacherMore.cshtml";
}

<h2>Bæta við prófi í borð: @Model.Level.Title</h2>
<section class="TeacherMainContent" id="TeacherSingleMainContent">
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend></legend>
        @Html.HiddenFor(model => model.LevelId)

        <div class="editor-label">
            @Html.LabelFor(model => model.TestName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TestName)
            @Html.ValidationMessageFor(model => model.TestName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MaxPoints)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MaxPoints)
            @Html.ValidationMessageFor(model => model.MaxPoints)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Days)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Days)
            @Html.ValidationMessageFor(model => model.Days)
        </div>

        <p>
            <input type="submit" value="Staðfesta" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Til baka í lista", "Details", "Level", new { id = Model.LevelId }, new { })
</div>
</section>